

using System;
using System.Collections.Generic;
using System.Text;

namespace JTC.MiniCommerce.Store {
  public partial class ProviderController {
  
    #region Constants
    
    private const string NAME = "Name";
    
    #endregion
    
    #region Methods
    
    #region Public

    /// <summary>
    /// Fetches the type of the by provider.
    /// </summary>
    /// <param name="providerType">Type of the provider.</param>
    /// <returns></returns>
    public ProviderCollection FetchByProviderType(ProviderType providerType) {
      ProviderCollection providerCollection = new ProviderCollection().
        Where(Provider.Columns.ProviderTypeId, providerType).OrderByAsc(NAME).Load();
      return providerCollection;
    }
    
    #endregion
    
    #endregion
    
  }
}
